package com.study.task;

import cn.hutool.core.date.DateUtil;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 基础定时器
 * @author hw
 * @date 2022/12/6 17:47:02
 */
@Component
@EnableScheduling
public class TaskTest1 {

    /**
     * 间隔1秒执行
     */
    //@Scheduled(cron = "0/1 * * * * ?")
    public void test() throws Exception{
        System.out.println("TaskTest1任务逻辑执行中，当前时间：" + DateUtil.now());
    }
}
